#include "army_dom_unit.h"
//==============================
#include "p_army_dom_unit_data.h"


ArmyDomUnit::ArmyDomUnit()
{
    m_data->m_name = QString();
    m_data->m_addr = QString();
    m_data->m_rankType = armydom::RT_None;
}

ArmyDomUnit::ArmyDomUnit(const QString &name, const QString &addr)
{
    m_data->m_name = name;
    m_data->m_addr = addr;
    m_data->m_rankType = chooseRankType(name);
}

ArmyDomUnit::ArmyDomUnit(const QString &name, const QString &addr, armydom::RankType rankType)
{
    m_data->m_name = name;
    m_data->m_addr = addr;
    m_data->m_rankType = rankType;
}

ArmyDomUnit::~ArmyDomUnit()
{ }

ArmyDomUnit::ArmyDomUnit(const ArmyDomUnit &other) :
    m_data(other.m_data)
{ }

ArmyDomUnit &ArmyDomUnit::operator =(const ArmyDomUnit &other)
{
    m_data = other.m_data;
    return *this;
}

armydom::RankType ArmyDomUnit::chooseRankType(const QString &name)
{
    armydom::RankType ret = armydom::RT_None;

    return ret;
}


